HAL IRDA state and error functions migration ¶
This section provides information about the HAL IRDA state and error functions migration.
HAL IRDA get state ¶
- In HAL2, Separate functions are added for specific state machines:
-
HAL_UART_GetTxState()to check the transmission state.HAL_UART_GetRxState()to check the reception state.
|
HAL1 |
HAL2 |
|---|---|
HAL_IRDA_GetState(IRDA_HandleTypeDef *hirda)
|
HAL_UART_GetState (const hal_uart_handle_t *huart)
HAL_UART_GetTxState(const hal_uart_handle_t *huart)
HAL_UART_GetRxState(const hal_uart_handle_t *huart)
|
Related concepts: Revised and optimized HAL state machine
HAL IRDA get error ¶
|
HAL1 |
HAL2 |
|
|---|---|---|
|
Description |
In HAL1, the function
|
In HAL2, the function
|
|
Function name |
HAL_IRDA_GetError(IRDA_HandleTypeDef *hirda);
|
HAL_UART_GetLastErrorCodes(const hal_uart_handle_t *huart);
|
Note
In HAL2, the constant
HAL_IRDA_ERROR_INVALID_CALLBACK
has been removed. Instead, functions
HAL_UART_RegisterXXXCallback()
return
HAL_INVALID_PARAM
in case of an invalid callback pointer.
Related concepts: Revised and optimized HAL error management